<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<title></title>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
	<style type="text/css">
		.mui-grid-view.mui-grid-9 .mui-table-view-cell {
			margin: 0px;
			padding: 12px 10px;
			vertical-align: top;
			border-right: 1px solid #eee;
			border-bottom: 1px solid #eee;
			background-color: white;
			border-radius: 8px;
		}
		
	</style>
</head>
<body>
<div class="mui-content" style="margin-top: 10px;margin-left: 20px;margin-right: 20px;">
	<div style="margin-left: 15px; margin-top: 15px;font-size: 14px;color: darkgray;text-align: left;">新动态</div>
	<ul class="mui-table-view mui-grid-view mui-grid-9" style="margin-top: 5px;" id="dt-list-id" v-cloak>
		<li class="mui-table-view-cell mui-media mui-col-xs-6"  v-for="item in items">
			<a @tap="tableDidSelected(item);">
				<div class="mui-media-body">{{item.title}}</div>
			</a>
		</li> 
	</ul>
	
	<div style="margin-left: 15px; margin-top: 15px;font-size: 14px;color: darkgray;text-align: left;">生活服务</div>
	<ul class="mui-table-view mui-grid-view mui-grid-9" style="margin-top: 5px;" id="life-list-id" v-cloak>
		<li class="mui-table-view-cell mui-media mui-col-xs-6" v-for="item in items">
			<a  @tap="tableDidSelected(item);">
				<div class="mui-media-body">{{item.title}}</div>
			</a>
		</li>
	</ul>
	
	<div style="margin-top: 5px;font-size: 13px;color: #666; background-color: white;padding:8px 10px;border-radius: 8px;">
		<div style="width:4px;height:4px;border-radius:50%;background-color:darkorange; display: inline-block;"></div>
		<span style="margin-left: 5px;">请选择合适的分类，<i>违规不合理的系统自动被删除</i> </span> <br>
		
		<div style="width:4px;height:4px;border-radius:50%;background-color:darkorange; display: inline-block; "></div>
		<div style="display: inline-block; margin-left: 5px;">
			查看<span style="margin-left: 0px; color: #FF0000"> <u onclick="gotoPublishProfile()">发布须知</u> </span>
		</div>
	</div>
</div>

<script src="../../js/mui.js"></script>
<script src="../../js/p/base-data.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/p/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/p/open.page.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/p/api.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	mui.init();
	
	var isFirstTap = true;
	var dtlist = new Vue({
		el: '#dt-list-id',
		data: {
			items: []
		}
	});
	
	var dtArr = itemType[0];
	dtlist.items = dtArr;
	
	var lifelist = new Vue({
		el: '#life-list-id',
		data: {
			items: []
		}
	});
	
	var lifeArr = itemType[1];
	lifelist.items = lifeArr;
	
	
	function tableDidSelected(item){
		mui.confirm('请发布有效信息，否则审核无法通过。','提示',['确定','取消'],function (e) {
			console.log("e.index: " + e.index);
			if (e.index == 0) {
				var hud = plus.nativeUI.showWaiting();
				setTimeout( function(){
					console.log(JSON.stringify(item));
					
					openNewPage('../publish/publish-dt.html', '发布动态' , true,{'itemType':item});
					hud.close();
				},500);
			}
		});
	}
	
	function gotoPublishProfile(){
		openNewPage('../me/webpage.html' , '发布须知' , true , {'url':BASE_URL + publish_note_url});	
	}
</script>
</body>
</html>
